package com.eight.clienthome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eight.clienthome.dao.BannerDao;
import com.eight.clienthome.service.BannerService;
import com.eight.common.pojo.CrmBanner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 向文豪
 * @program: eight-education-parent
 * @description:
 * @date 2023/6/2 11:14
 */
@Service
public class BannerServiceImpl implements BannerService {
    @Autowired
    private BannerDao bannerDao;
    @Override
    public List<CrmBanner> findAll() {
        QueryWrapper<CrmBanner> wrapper = new QueryWrapper<>();
        wrapper.eq("is_disable",0);
        List<CrmBanner> crmBanners = bannerDao.selectList(wrapper);
        return crmBanners;
    }
}
